<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-bind</title>
</head>
<body>
    <div id="app">
        <img :src="imgLogo" alt="">
        <img v-bind:src="imgLogo" alt="" :title="imageTitle" :class="{active:isActive}" @click="toggleActive">
        <img v-bind:src="imgLogo" alt="" :title="imageTitle" :class="isActive?'active':''" @click="toggleActive">
    </div>
    <style>
        .active{
            border: 1px solid red;
        }
    </style>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el:'#app',
            data:{
                imgLogo:"https://img2.baidu.com/it/u=3073865373,3613492176&fm=26&fmt=auto&gp=0.jpg",
                imageTitle:'设计师天堂',
                isActive:false
            },
            methods:{
                toggleActive:function () {
                    this.isActive = !this.isActive
                }
            }
        })
    </script>
</body>
</html>